import React from 'react';
function Repeat(props) {
    let items = [];
    for(let i=0;i<props.numTimes;i++) {
        items.push(props.children(i*10));
    }

    return <div>{items}</div>;
}


export function ListOfTenThings() {
    return (
        <Repeat numTimes={10}>
            {(index)=><div key={index}>This is item {index} in the list</div> }
        </Repeat>
    )

}